package cn.wolfcode.wolf2w.destination.service.impl;

import cn.wolfcode.wolf2w.destination.entity.TaRegion;
import cn.wolfcode.wolf2w.destination.mapper.TaRegionMapper;
import cn.wolfcode.wolf2w.destination.service.ITaRegionService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 区域表 服务实现类
 * </p>
 *
 * @author hyz
 * @since 2024-07-23
 */
@Service
public class TaRegionServiceImpl extends ServiceImpl<TaRegionMapper, TaRegion> implements ITaRegionService {

    @Autowired
    private TaRegionMapper regionMapper;

    @Override
    public List<TaRegion> queryByState(int ishot) {
        LambdaQueryWrapper<TaRegion> qw = new LambdaQueryWrapper<>();
        qw.eq(TaRegion::getIshot, ishot);

        return regionMapper.selectList(qw);
    }
}
